﻿using System.ComponentModel;

namespace FileTransfer.Vollk.Model
{
    /// <summary>
    /// FTP站点配置
    /// </summary>
    public class SiteConfig
    {
        /// <summary>
        /// 站点
        /// </summary>
        public string Site { get; set; }
        /// <summary>
        /// 地址
        /// </summary>
        public string IP { get; set; }
        /// <summary>
        /// 端口
        /// </summary>
        public int Port { get; set; }
        /// <summary>
        /// 用户名
        /// </summary>
        public string UserId { get; set; }
        /// <summary>
        /// 密码
        /// </summary>
        public string Password { get; set; }
        /// <summary>
        /// 请求解析的原始FTP-URL
        /// </summary>
        public string Url { get; set; }
        /// <summary>
        /// 站点根路径
        /// </summary>
        public string SiteRootUrl { get; set; }
        /// <summary>
        /// 缓存大小
        /// </summary>
        public int CacheSize { get; set; } = 102400;
        /// <summary>
        /// 超时时长（毫秒） 设置30分钟的超时时间 30 * 60 * 1000
        /// </summary>
        public int TimeOut { get; set; } = 30 * 60 * 1000;
        /// <summary>
        /// 字符编码 UTF8、GBK
        /// </summary>
        [DisplayName("字符编码")]
        public string Encoding { get; set; } = "UTF8";
        /// <summary>
        /// 是否支持断点续传
        /// </summary>
        [DisplayName("断点续传")]
        public bool AllowResume { get; set; } = true;
    }
}
